package VisualComponent;
// 黑色边框装饰类
public class BlackBorderDecorator extends ComponentDecorator {
    public BlackBorderDecorator(IComponent component) {
        super(component);
    }

    @Override
    public void display() {
        super.display(); // 先调用原始构件的显示方法
        addBlackBorder(); // 添加黑色边框效果
    }

    private void addBlackBorder() {
        System.out.println("添加黑色边框");
    }
}